from rest_framework import serializers
from .models import *


class VipLevelSerializer(serializers.ModelSerializer):

    class Meta:
        model = VipLevel
        exclude = ['datetime_created', 'datetime_updated']


class VipSalesSerializer(serializers.ModelSerializer):
    amount_left = serializers.IntegerField(read_only=True)
    can_sale = serializers.BooleanField(read_only=True)

    class Meta:
        model = VipSales
        depth = 1
        exclude = ['datetime_created', 'datetime_updated']


class VipSalesOrderSerializer(serializers.ModelSerializer):

    class Meta:
        model = VipSalesOrder
        depth = 1
        exclude = ['user']
